<template>
  <div class="container">
    <wechat-account-detail :account-id="accountId" />
    <wechat-account-form :account-id="accountId" />
  </div>
</template>

<script>
import WechatAccountDetail from './components/WechatAccountDetail'
import WechatAccountForm from './components/WechatAccountForm'

export default {
  name: 'WechatAccountEdit',
  components: {
    WechatAccountDetail,
    WechatAccountForm
  },
  data() {
    return {
      accountId: ''
    }
  },
  watch: {
    $route: {
      handler(route) {
        this.accountId = route.params && route.params.id
      },
      immediate: true
    }
  },
  created() {
    this.accountId = this.$route.params.id
  }
}
</script>

<style lang="scss" scoped>
.container {
  padding: 40px 140px;
}
</style>
